
#ifndef __SAMPLE_APP_H__
#define __SAMPLE_APP_H__

#include "App/LaborApp.h"
#include <stdio.h>
#include "LaborCore.h"
#include "Renderer\LaborRenderSystem.h"
#include "Renderer\LaborTexture.h"
#include <d3d10.h>
#include <d3dx10.h>
#include <string>

#include <windows.h>
#include "Common\LaborCommonFunction.h"
#include "Common\LaborLogger.h"

#if (defined( __WIN32__ ) || defined( _WIN32 ) || defined( WIN32 ))  
#   ifdef SAMPERHELPER_EXPORTS
#       define SAMPLE_API __declspec(dllexport)
#   else
#       define SAMPLE_API __declspec(dllimport)
#   endif
#else
#       define SAMPLE_API
#endif

using namespace std;
using namespace Labor;

class SAMPLE_API CSampleApp :	public ILApp
{
protected:
	//--------------------------------------------------------------------------------------
	// Member Variables
	//--------------------------------------------------------------------------------------
	HINSTANCE               m_hInst;
	HWND                    m_hWnd;
	ILRenderSystem      *   m_pRenderSystem;

	wstring                 m_strShaderPath;

	std::wstring            m_strLogFileName;
	std::wstring            m_strBaseWindowName;
	std::wstring            m_strCurrentPath;
public:
	CSampleApp(void);
	virtual ~CSampleApp(void);
    ///====================init==================///
	virtual bool      init( const char* appModuleFile, const wchar_t* className, const wchar_t* window_name, int width, int height );
	virtual bool      initEnv();
	virtual bool      uinit();
	///====================init==================///
	virtual void            onEvent(MSG& msg);
	virtual bool            updateFrame(int passedTime);

	HRESULT InitWindow( HINSTANCE hInstance, int nCmdShow, const wchar_t* className, const wchar_t* window_name, int width, int height );
	virtual void initRenderData() = 0;
	virtual void Render() = 0;

	virtual bool beginLog(const wchar_t* fileName);
	virtual bool endLog();
	void         setFPS( float fFPS );
};

#endif
